<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回一个数组包含所有已声明的接口</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.get-declared-interfaces" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_declared_interfaces</h1>
  <p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">get_declared_interfaces</span> &mdash; <span class="dc-title">返回一个数组包含所有已声明的接口</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.get-declared-interfaces-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>get_declared_interfaces</strong></span>
    ( <span class="methodparam">void</span>
   ) : <span class="type">array</span></div>

  <p class="para rdfs-comment">
   返回一个数组包含所有已声明的接口。
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.get-declared-interfaces-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   本函数返回一个数组，其内容是当前脚本中所有已声明的接口的名字。
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.get-declared-interfaces-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-6141">
    <p><strong>Example #1 <span class="function"><strong>get_declared_interfaces()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">get_declared_interfaces</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; Traversable
    [1] =&gt; IteratorAggregate
    [2] =&gt; Iterator
    [3] =&gt; ArrayAccess
    [4] =&gt; reflector
    [5] =&gt; RecursiveIterator
    [6] =&gt; SeekableIterator
)
</pre></div>
    </div>
   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.get-declared-interfaces-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="interface_exists.html" class="function" rel="rdfs-seeAlso">interface_exists()</a> - 检查接口是否已被定义</span></li>
    <li class="member"><span class="function"><a href="get_declared_classes.html" class="function" rel="rdfs-seeAlso">get_declared_classes()</a> - 返回由已定义类的名字所组成的数组</span></li>
    <li class="member"><span class="function"><a href="class_implements.html" class="function" rel="rdfs-seeAlso">class_implements()</a> - 返回指定的类实现的所有接口。</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>